package cn.u313.repository;

import cn.u313.entry.TestEntry;
import cn.u313.entry.UserEntry;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UserEntryRepository extends JpaRepository<UserEntry, Integer>, JpaSpecificationExecutor<UserEntry> {
    @Query(nativeQuery = true,value = "SELECT * FROM `t_yjilu` where id = '89152' ")
    public TestEntry byId();
    @Query(nativeQuery = true,value = "SELECT * FROM `user` where qq = :qq ")
    UserEntry byQQ(String qq);

    @Query(nativeQuery = true,value = "SELECT * FROM `user` where qun like :group order by m desc limit 0,10")
    List<UserEntry> getPaiXu10(String group);

}